/* Milky Moo Unidades – Minimalist Pink 2025 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.mm-unidades-wrapper {
    font-family: 'Inter', sans-serif;
    max-width: 1650px;
    margin: 5px auto;
    padding: 0 20px;
}

.mm-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #EA95A8, #f8bac7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mm-table-container {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(234, 149, 168, 0.15);
    background: white;
}

.mm-unidades-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.mm-unidades-table th {
    background: #EA95A8;
    color: white;
    padding: 9px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mm-unidades-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
    font-size: 14px;
}

.mm-unidades-table td code {
    background: #f8f0f2;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #EA95A8;
}

.mm-unidades-table tr:hover td {
    background: #fff5f8;
    cursor: pointer;
}

.mm-unidades-table tr:last-child td {
    border-bottom: none;
}

/* MODAL */
.mm-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.mm-modal.open {
    display: flex;
    opacity: 1;
}

.mm-modal-content {
    width: 900px;
    max-width: 95vw;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mm-modal-header {
    padding: 24px 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#mm-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

#mm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #EA95A8;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

#mm-modal-close:hover {
    background: #FDE8EB;
}

/* Tabs */
.mm-tabs {
    display: flex;
    padding: 0 30px;
    margin: 20px 0 0;
    gap: 8px;
}

.mm-tab {
    padding: 12px 24px;
    border: none;
    background: #f8f0f2;
    color: #EA95A8;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 14px;
}

.mm-tab.active {
    background: #EA95A8;
    color: white;
}

/* Conteúdo */
.mm-tab-content {
    padding: 0 30px 30px;
    display: none;
}

.mm-tab-content.active { display: block; }

.mm-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.mm-info-item {
    background: #f8f8f8;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid #EA95A8;
}

.mm-info-item strong {
    display: block;
    color: #EA95A8;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.mm-info-item span {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Financeiro */
.mm-loading {
    text-align: center;
    padding: 60px 20px;
    color: #EA95A8;
}

.mm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #EA95A8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.mm-total {
    font-size: 24px;
    font-weight: 700;
    color: #EA95A8;
    text-align: right;
    margin: 20px 0;
    padding: 16px 20px;
    background: #fff5f8;
    border-radius: 12px;
}

.mm-fin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.mm-fin-table th {
    text-align: left;
    padding: 14px 12px;
    background: #EA95A8;
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.mm-fin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
}

.mm-fin-table tr:last-child td {
    border-bottom: none;
}

/* PAGINAÇÃO MILKY MOO – MINIMALISTA */
.mm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 25px 0 10px;
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
}

.mm-page-btn {
    background: #EA95A8;
    color: white;
    padding: 8px 14px;              /* menor, mais minimalista */
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;                /* reduzido */
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(234,149,168,0.25);
}

.mm-page-btn:hover {
    background: #d96b83;
    box-shadow: 0 4px 10px rgba(234,149,168,0.35);
    transform: translateY(-1px);
}

/* Botão ativo */
.mm-page-btn.active {
    background: #C54462;
    box-shadow: 0 3px 10px rgba(197,68,98,0.35);
}

/* Botão desativado */
.mm-page-btn.disabled {
    background: #e5e5e5;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

/* Força a aba FINANCEIRO ter scroll interno */
#tab-financeiro {
    max-height: 60vh;         /* limita altura dentro do modal */
    overflow-y: auto;         /* ativa scroll vertical */
    overflow-x: hidden;       /* não deixa barra horizontal */
    padding-right: 6px;       /* espaço para não colar na borda */
}
