/* =========================================================
   PROPOSIA — COMPONENTES COMPARTILHADOS
   Botões, modal e botões de fechar/excluir.
   ========================================================= */

/* ----- BOTÕES ----- */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-pill);
    border: 1px solid var(--preto);
    font-weight: 600;
    font-size: 14px;
    padding: var(--btn-padding, 14px 28px);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* Preto sólido (padrão da marca) */
.btn-primary {
    background-color: var(--preto);
    color: var(--branco);
}

.btn-primary:hover {
    background-color: var(--branco);
    color: var(--preto);
}

/* Branco com borda preta */
.btn-secondary {
    background-color: var(--branco);
    color: var(--preto);
}

/* Transparente com borda (ex.: "Sou assinante") */
.btn-outline {
    background: transparent;
    color: var(--preto);
    padding: 12px 24px;
}

.btn-outline:hover {
    background-color: var(--branco);
}

.btn-block {
    width: 100%;
}

.btn:disabled,
.btn.is-disabled {
    background-color: var(--cinza-desativado);
    border-color: var(--cinza-desativado);
    color: var(--branco);
    pointer-events: none;
    cursor: default;
}

/* Link sublinhado usado como "Cancelar" */
.btn-link {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--preto);
    text-decoration: underline;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* Botão redondo de fechar (X) */
.btn-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--preto);
    background: transparent;
    color: var(--preto);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
}

.btn-close:hover {
    background-color: var(--cinza-bg);
}

.btn-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
}

/* Ícone de lixeira (excluir) */
.btn-icon-danger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.btn-icon-danger:hover {
    background-color: var(--vermelho-bg);
}

.btn-icon-danger svg {
    width: 16px;
    height: 16px;
    stroke: var(--vermelho);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ----- MODAL ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--overlay-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--branco);
    width: 90%;
    max-width: 1100px;
    max-height: calc(90vh - 200px);
    min-height: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--cinza-borda);
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

/* ----- BADGES DE STATUS ----- */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

.badge-red { background-color: var(--vermelho-bg); color: var(--vermelho); }
.badge-yellow { background-color: var(--amarelo-bg); color: var(--amarelo); }
.badge-blue { background-color: var(--azul-bg); color: var(--azul); }
.badge-green { background-color: var(--verde-status-bg); color: var(--verde-status); }
.badge-gray { background-color: var(--cinza-bg); color: var(--cinza-texto-card); }

/* ----- AVATAR: foto do perfil ou iniciais (círculo preto, letras brancas) ----- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background-color: #000000;
    color: #FFFFFF;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    overflow: hidden;
    user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-md { width: 44px; height: 44px; font-size: 16px; }
.avatar-lg { width: 112px; height: 112px; font-size: 40px; }
