/* =========================================
   BUSCA, REPORTS E CONFIRMAÇÕES (A janela que estava quebrada)
   ========================================= */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 24, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.search-box {
    background-color: #16162A;
    width: 90%;
    max-width: 450px;
    height: 80vh;
    border-radius: 16px;
    border: 1px solid #4A4A6A;
    display: flex;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
}

.search-box input {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #4A4A6A;
    background-color: #1E1E38;
    color: #E8E8FF;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 12px;
    outline: none;
}

.search-box input:focus {
    border-color: #7B3FF2;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #16162A;
}

.search-results::-webkit-scrollbar-thumb {
    background: #4A4A6A;
    border-radius: 4px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #1E1E38;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 8px;
}

.result-icon {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
}

.result-name {
    font-size: 14px;
    font-weight: bold;
    color: #E8E8FF;
}

button#close-search {
    margin-top: 16px;
    padding: 12px;
    background-color: #2A2A4A;
    color: #E8E8FF;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

button#close-search:hover {
    background-color: #FF5252;
    color: white;
}

.hidden {
    display: none !important;
}

.confirm-modal-content {
    background: #1E1E38;
    border: 1px solid #FF5252;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    max-width: 320px;
    width: 90%;
}

.modal-buttons-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.btn-danger {
    background: #FF5252;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
}

.btn-secondary {
    background: #4A4A6A;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
}

/* =========================================
   OVERLAY DO PIX 
   ========================================= */
#pix-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#pix-modal.open {
    display: flex;
}

.pix-card {
    background: #1E1E38;
    border: 1px solid #00E676;
    border-radius: 16px;
    padding: 24px 20px;
    width: 90%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 230, 118, 0.15);
}

.pix-card h3 {
    color: #00E676;
    margin: 0;
    font-size: 18px;
}

.pix-card p {
    color: #8888BB;
    font-size: 12px;
    margin: 0;
    text-align: center;
}

#pix-qr {
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    line-height: 0;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pix-qr img,
#pix-qr canvas {
    width: 144px !important;
    height: 144px !important;
}

.pix-key {
    background: #0A0A18;
    border: 1px dashed #00E676;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 11px;
    font-family: monospace;
    color: #00E676;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    word-break: break-all;
    user-select: all;
}

.btn-copy {
    width: 100%;
    background: #00E676;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-copy:hover {
    opacity: 0.85;
}

.btn-copy.copied {
    background: #7B3FF2;
    color: #fff;
}

.btn-close-pix {
    background: transparent;
    border: none;
    color: #8888BB;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    padding: 4px;
}

.btn-close-pix:hover {
    color: #E8E8FF;
}

#pix-modal>* {
    pointer-events: auto;
}