﻿body {    
    padding: 20px;
}

.grid-container {
    font-family: sans-serif;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: visible;
    position: relative;
}

.grid-header, .envelope-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 15px;
    background: #fff;
}

.grid-header {
    font-weight: bold;
    background: #f4f4f4;
    border-bottom: 1px solid #ddd;
    color: #444;
}

    .grid-header > div,
    .envelope-row > div {
        padding-right: 10px;
    }

.col-checkbox {
    width: 30px;
    text-align: center;
}

.col-main {
    flex: 2;
}

.col-status {
    flex: 1.5;
}

.col-time {
    flex: 0.8;
    font-size: 14px;
    color: #333;
}

.col-action {
    position: relative;
    display: flex;
    gap: 6px;
    align-items: center;
}

.envelope-header {
    font-weight: 600;
    margin-bottom: 4px;
}

.envelope-sub {
    font-size: 14px;
    color: #555;
}

.more {
    color: #5c3efc;
    cursor: pointer;
}

.status {
    font-weight: 500;
    margin-bottom: 4px;
}

.status-bar {
    height: 4px;
    border-radius: 4px;
    width: 100px;
}

.fail {
    color: #b00020;
}

.fail-bar {
    background-color: #d7003a;
    width: 80px;
}

.waiting {
    color: #5c3efc;
}

.waiting-bar {
    background-color: #5c3efc;
    width: 60px;
}

.success {
    color: #2e7d32;
}

.success-bar {
    background-color: #2e7d32;
    width: 100px;
}

.action-button {
    background: none;
    border: 1px solid #5c3efc;
    color: #5c3efc;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.dot-menu {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
}

.options-menu {
    display: none;
    position: absolute;
    top: 25px;
    right: 0;
    background: white;
    border: 3px solid #ddd;
    box-shadow: 0 8px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    z-index: 9999;
    min-width: 160px;
}

    .options-menu.show {
        display: block;
    }

    .options-menu input[type="submit"] {
        display: block;
        width: 100%;
        background: none;
        border: none;
        text-align: left;
        padding: 9px;
        font-size: 10px;
        cursor: pointer;
        color: #333;
        position: relative;
        margin: 0px;
    }

        .options-menu input[type="submit"]:hover {
            background-color: #f5f5f5;
        }

.has-submenu::after {
    content: "▶";
    font-size: 12px;
    position: absolute;
    right: 10px;
}

.button-wrapper {
    position: relative;
    display: inline-block;
    width: 100%; /* garante alinhamento relativo ao container */
}

    .button-wrapper input[type="submit"] {
        width: 100%;
        padding-right: 24px; /* espaço para a seta */
        box-sizing: border-box;
    }

    .button-wrapper .arrow-icon {
        position: absolute;
        right: 8px; /* distância da borda direita */
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        color: #444;
        font-size: 12px;
    }

.submenu-wrapper {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 10px;
    left: 100%;
    background: white;
    border: 3px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 8px rgba(0,0,0,0.1);
    min-width: 150px;
}

    .submenu button {
        padding: 8px 10px;
    }

.submenu-wrapper:hover .submenu {
    display: block;
}

/* Paginação */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
    padding: 10px 0;
    font-family: sans-serif;
}

.page-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
}

    .page-btn:hover {
        background-color: #f0f0f0;
    }

    .page-btn.active {
        background-color: #5c3efc;
        color: white;
        border-color: #5c3efc;
        font-weight: bold;
    }

    .page-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.dots {
    font-size: 16px;
    color: #888;
}

