/* ===============================
   BASE / RESET
================================ */
* {
    box-sizing: border-box;
}

/* ===============================
   JSON VIEW
================================ */

pre {
    margin: 0;
    padding: 12px;
    background: #0b1020;
    color: #e5e7eb;
    border-radius: 8px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.5;
}

body {
    font-family: system-ui, Arial, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

/* ===============================
   BRAND
================================ */
.brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-icon {
    height: 42px;
}

.brand-text {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 34px;
    font-weight: 500;
    color: var(--text-soft);
    letter-spacing: -0.5px;
}

.brand-accent {
    color: var(--primary);
}

/* ===============================
   BUTTONS
================================ */
.btn {
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

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

/* ===============================
   MODAL
================================ */
/* ===============================
   MODAL (GLOBAL)
================================ */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

.modal.open {
    display: flex;
}

.modal-card {
    width: min(960px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

/* ---------- Modal Header ---------- */
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}

/* ---------- Modal Body ---------- */
.modal-body {
    padding: 12px 16px;
}


/* ===============================
   TOAST
================================ */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Card do toast */
.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
    color: #fff;
    cursor: pointer;

    /* 🔥 FIX PRINCIPAL */
    display: flex;
    align-items: flex-start;
    /* mantém o X no topo */
    justify-content: space-between;
    gap: 10px;

    animation: toastIn .25s ease-out;
}

/* Conteúdo */
.toast-msg {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

/* Botão fechar */
.toast-close {
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    margin-top: 2px;
    /* ajuste fino visual */
    user-select: none;
}

.toast-close:hover {
    opacity: 1;
}

/* Tipos */
.toast.success {
    background: var(--primary);
}

.toast.error {
    background: var(--danger);
}

/* Animação */
@keyframes toastIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}