/* Planilha dinâmica */
    .mp-sheet {
        width: 100%;
        border: 1px solid rgba(var(--app-primary-color-rgb), .20);
        border-radius: 10px;
        overflow: hidden;
        background: rgba(255, 255, 255, .025);
    }

    .mp-sheet-toolbar {
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 12px;
        border-bottom: 1px solid rgba(var(--app-primary-color-rgb), .18);
        background: rgba(var(--app-primary-color-rgb), .08);
    }

    .mp-sheet-toolbar-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .mp-sheet-toolbar-info {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: .78rem;
        opacity: .82;
        white-space: nowrap;
    }

    .mp-sheet-empty {
        min-height: 220px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 30px;
        text-align: center;
    }

    .mp-sheet-empty > i {
        font-size: 2.2rem;
        opacity: .35;
    }

    .mp-sheet-empty > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mp-sheet-empty strong {
        font-size: .95rem;
    }

    .mp-sheet-empty span {
        font-size: .82rem;
        opacity: .65;
    }

    .mp-sheet-container {
        width: 100%;
        max-height: calc(100vh - 280px);
        overflow: auto;
        scrollbar-width: thin;
    }

    .mp-sheet-table {
        width: max-content;
        min-width: 100%;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
        margin: 0;
        font-size: .78rem;
    }

    .mp-sheet-table thead th {
        position: sticky;
        top: 0;
        z-index: 5;
        height: 46px;
        padding: 5px 9px;
        vertical-align: middle;
        text-align: left;
        color: inherit;
        background: var(--app-bg-color2);
        border-right: 1px solid rgba(255, 255, 255, .08);
        border-bottom: 1px solid rgba(var(--app-primary-color-rgb), .35);
    }

    .mp-sheet-table tbody td {
        height: 34px;
        padding: 0;
        vertical-align: middle;
        background: rgba(255, 255, 255, .025);
        border-right: 1px solid rgba(255, 255, 255, .07);
        border-bottom: 1px solid rgba(255, 255, 255, .07);
    }

    .mp-sheet-table tbody tr:nth-child(even) td {
        background: rgba(255, 255, 255, .045);
    }

    .mp-sheet-table tbody tr:hover td {
        background: rgba(var(--app-primary-color-rgb), .10);
    }

    .mp-sheet-table tbody tr.mp-sheet-row-selected td {
        background: rgba(var(--app-primary-color-rgb), .16);
    }

    .mp-sheet-table tbody tr.mp-sheet-row-error td {
        background: rgba(220, 53, 69, .12);
        border-bottom-color: rgba(220, 53, 69, .25);
    }

    .mp-sheet-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .mp-sheet-header-content {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .mp-sheet-header-title {
        overflow: hidden;
        font-size: .78rem;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mp-sheet-header-type {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: .63rem;
        font-weight: 400;
        opacity: .55;
    }

    .mp-sheet-required {
        color: #ff7d87;
        margin-left: 2px;
    }

    .mp-sheet-index-column {
        position: sticky !important;
        left: 0;
        z-index: 4;
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        text-align: center !important;
        background: var(--app-bg-color2) !important;
        border-right: 1px solid rgba(var(--app-primary-color-rgb), .28) !important;
    }

    thead .mp-sheet-index-column {
        z-index: 7;
    }

    .mp-sheet-index {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        font-size: .72rem;
        opacity: .72;
    }

    .mp-sheet-index i {
        color: var(--app-primary-light);
        font-size: .7rem;
    }

    .mp-sheet-actions-column {
        position: sticky !important;
        right: 0;
        z-index: 4;
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        text-align: center !important;
        background: var(--app-bg-color2) !important;
        border-left: 1px solid rgba(var(--app-primary-color-rgb), .20) !important;
    }

    thead .mp-sheet-actions-column {
        z-index: 7;
    }

    .mp-sheet-delete-button {
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: inherit;
        opacity: .55;
        border: 0;
        border-radius: 5px;
        background: transparent;
        cursor: pointer;
        transition: background .15s ease, color .15s ease, opacity .15s ease;
    }

    .mp-sheet-delete-button:hover {
        color: #ff7d87;
        opacity: 1;
        background: rgba(220, 53, 69, .14);
    }

    .mp-sheet-cell-formula {
        background: rgba(var(--app-primary-color-rgb), .055) !important;
    }

    .mp-sheet-cell-detail {
        text-align: center;
    }

    .mp-sheet-container::-webkit-scrollbar {
        width: 9px;
        height: 9px;
    }

    .mp-sheet-container::-webkit-scrollbar-thumb {
        border: 2px solid transparent;
        border-radius: 10px;
        background: rgba(255, 255, 255, .24);
        background-clip: padding-box;
    }

    .mp-sheet-container::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, .08);
    }

    .mp-sheet-add-row {
        cursor: pointer;
    }

        .mp-sheet-add-row td {
            height: 34px;
            color: inherit;
            opacity: .62;
            background: rgba(var(--app-primary-color-rgb), .035) !important;
            border-bottom: 0 !important;
        }

        .mp-sheet-add-row:hover td {
            opacity: 1;
            color: var(--app-primary-light);
            background: rgba(var(--app-primary-color-rgb), .11) !important;
        }

    .mp-sheet-add-row-content {
        padding: 0 10px !important;
        font-size: .74rem;
        font-style: italic;
        border-right: 0 !important;
    }

    .mp-sheet-add-row-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .75rem;
    }

    @media (max-width: 768px) {
        .mp-sheet-toolbar {
            align-items: flex-start;
            flex-direction: column;
        }

        .mp-sheet-container {
            max-height: calc(100vh - 230px);
        }
    }

/* Células da planilha dinâmica */
    .mp-cell {
        width: 100%;
        height: 33px;
        display: flex;
        align-items: stretch;
        overflow: hidden;
    }

    .mp-cell-input {
        width: 100%;
        height: 33px;
        min-width: 0;
        padding: 4px 7px;
        color: inherit;
        font: inherit;
        line-height: 1.15;
        border: 1px solid transparent;
        border-radius: 0;
        outline: none;
        background: transparent;
        box-shadow: none;
        transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
    }

        .mp-cell-input:hover {
            background: rgba(255, 255, 255, .045);
        }

        .mp-cell-input:focus {
            position: relative;
            z-index: 2;
            border-color: var(--app-primary-light);
            background: var(--app-bg-color2);
            box-shadow: inset 0 0 0 1px var(--app-primary-light);
        }

    .mp-cell-input-wrapper {
        width: 100%;
        height: 33px;
        margin: 0 !important;
        padding: 0 !important;
    }

        .mp-cell-input-wrapper > .form-group,
        .mp-cell-input-wrapper .form-group {
            width: 100%;
            height: 33px;
            margin: 0 !important;
            padding: 0 !important;
        }

        .mp-cell-input-wrapper .form-input {
            width: 100%;
            height: 33px;
            min-width: 0;
            margin: 0;
            padding: 4px 7px;
            color: inherit;
            font: inherit;
            border: 1px solid transparent;
            border-radius: 0;
            outline: none;
            background: transparent;
            box-shadow: none;
        }

            .mp-cell-input-wrapper .form-input:hover {
                background: rgba(255, 255, 255, .045);
            }

            .mp-cell-input-wrapper .form-input:focus {
                border-color: var(--app-primary-light);
                background: var(--app-bg-color2);
                box-shadow: inset 0 0 0 1px var(--app-primary-light);
            }

    .mp-cell-number {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .mp-cell-textarea {
        resize: none;
        overflow: hidden;
    }

    .mp-cell-select {
        appearance: auto;
        cursor: pointer;
    }

    .mp-cell-readonly {
        width: 100%;
        height: 33px;
        display: flex;
        align-items: center;
        overflow: hidden;
        padding: 4px 7px;
        font-size: .76rem;
        text-overflow: ellipsis;
        white-space: nowrap;
        background: rgba(var(--app-primary-color-rgb), .045);
    }

    .mp-cell-muted {
        opacity: .62;
    }

    .mp-cell-checkbox {
        width: 100%;
        height: 33px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

        .mp-cell-checkbox input {
            width: 15px;
            height: 15px;
            margin: 0;
            accent-color: var(--app-primary-color);
            cursor: pointer;
        }

    .mp-cell-detail-button {
        width: 100%;
        height: 33px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0 8px;
        color: inherit;
        font-size: .74rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        cursor: pointer;
    }

        .mp-cell-detail-button:hover {
            color: var(--app-primary-light);
            background: rgba(var(--app-primary-color-rgb), .10);
        }

        .mp-cell-detail-button i {
            font-size: .8rem;
        }
