* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body.pagina-admin {
    width: 100%;
    min-height: 100vh;
    font-family: "Poppins", sans-serif;
    background:
        radial-gradient(circle at top, rgba(90, 90, 90, 0.25), transparent 35%),
        linear-gradient(135deg, #080808, #151515, #222);
    color: #f5f5f5;
    overflow-x: hidden;
}

.admin-wrapper {
    width: 100%;
    min-height: 100vh;
    padding: 30px 20px;
    overflow-x: hidden;
}

/* LOGIN */

.login-section {
    width: 100%;
    min-height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.admin-logo {
    display: block;
    width: 150px;
    max-width: 70%;
    height: auto;
    margin: 0 auto 20px auto;
}

.tag-admin {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #bdbdbd;
    margin-bottom: 12px;
    font-weight: 600;
}

.login-card h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.login-card p {
    color: #cfcfcf;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.form-login {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-login input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #333;
    background: #0d0d0d;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}

.form-login input::placeholder {
    color: #8d8d8d;
}

.form-login input:focus {
    border-color: #777;
}

.form-login button {
    width: 100%;
    margin-top: 8px;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: #f5f5f5;
    color: #111;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.form-login button:hover {
    background: #d4d4d4;
    transform: translateY(-2px);
}

.login-card small {
    display: block;
    margin-top: 22px;
    color: #888;
}

/* PAINEL */

.oculto {
    display: none !important;
}

.painel-section {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: hidden;
}

.painel-topo {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    background: rgba(18, 18, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 20px;
}

.painel-topo h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.painel-topo p {
    color: #cfcfcf;
    line-height: 1.5;
}

.btn-logout {
    border: none;
    padding: 13px 22px;
    border-radius: 12px;
    background: #2b2b2b;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
}

.btn-logout:hover {
    background: #444;
    cursor: pointer;
}

.lista-contatos {
    width: 100%;
    display: grid;
    gap: 18px;
}

.contato-card {
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    overflow-wrap: break-word;
    word-break: break-word;
}

.contato-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.contato-info {
    display: grid;
    gap: 10px;
}

.contato-info p {
    color: #d6d6d6;
    line-height: 1.5;
}

.contato-info strong {
    color: #fff;
}

.mensagem {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
    background: #0d0d0d;
    border: 1px solid #292929;
}

.data-contato {
    margin-top: 16px;
    color: #8f8f8f;
    font-size: 0.85rem;
}

.mensagem-vazia {
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    color: #cfcfcf;
}

.mensagem-login {
    display: none;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 70, 70, 0.12);
    border: 1px solid rgba(255, 70, 70, 0.35);
    color: #ffb3b3;
    font-size: 0.88rem;
    line-height: 1.4;
    text-align: center;
}

.mensagem-login.ativo {
    display: block;
}

/* ERRO INPUT */

.input-erro {
    border-color: #ff4d4d !important;
    animation: shake 0.35s ease;
}

/* animação de tremida */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0);
    }
}

/* efeito leve de brilho vermelho */
.input-erro:focus {
    box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.2);
}


.painel-acoes {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ddd;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.btn-voltar:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.05);
}

.btn-voltar.top {
    margin-bottom: 20px;
}

.btn-logout,
.btn-voltar {
    cursor: pointer;
}

.contato-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-excluir {
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 80, 80, 0.4);
    background: rgba(255, 80, 80, 0.1);
    color: #ff7a7a;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-excluir:hover {
    background: rgba(255, 80, 80, 0.25);
    color: #fff;
    transform: translateY(-1px);
}


/* MODAL FUNDO */
.modal-excluir {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-excluir.oculto {
    display: none;
}

/* CAIXA */
.modal-box {
    width: 90%;
    max-width: 400px;
    background: #111;
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: fadeUp 0.3s ease;
}

.modal-box h3 {
    margin-bottom: 10px;
}

.modal-box p {
    color: #bbb;
    font-size: 0.9rem;
}

/* BOTÕES */
.modal-acoes {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-acoes button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancelar {
    background: #2a2a2a;
    color: #ccc;
}

.btn-cancelar:hover {
    background: #3a3a3a;
}

.btn-confirmar {
    background: #ff4d4d;
    color: #fff;
}

.btn-confirmar:hover {
    background: #ff2f2f;
}

/* animação */
@keyframes fadeUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.contato-card {
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.45s ease, margin 0.45s ease, padding 0.45s ease;
    overflow: hidden;
}

.contato-card.removendo {
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
    max-height: 0 !important;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
}

.contato-acoes {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-editar {
    background: transparent;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.btn-editar:hover {
    background: #fff;
    color: #000;
}

.modal-editar {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    padding: 1rem;
}

.modal-editar.oculto {
    display: none;
}

.modal-editar-box {
    width: 90%;
    max-width: 520px;
    background: #111;
    border-radius: 18px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: fadeUp 0.3s ease;
}

.modal-editar-box h3 {
    margin-bottom: 8px;
}

.modal-editar-box p {
    color: #bbb;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.modal-editar-box label {
    display: block;
    margin: 12px 0 6px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-editar-box input,
.modal-editar-box textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid #333;
    background: #0d0d0d;
    color: #fff;
    font-family: "Poppins", sans-serif;
    outline: none;
}

.modal-editar-box textarea {
    min-height: 110px;
    resize: vertical;
}

.modal-editar-box input:focus,
.modal-editar-box textarea:focus {
    border-color: #777;
}

.btn-confirmar-editar {
    background: #f5f5f5;
    color: #111;
}

.btn-confirmar-editar:hover {
    background: #d4d4d4;
}

.modal-editar-box {
    margin: auto;
}

.modal-editar-box select {
    width: 100%;
    height: 52px;
    /* menor */
    padding: 0 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: #0c0c0c;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.90rem;
    /* fonte menor */
    font-weight: 400;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: 0.3s;
}

.toast-sucesso {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(30px);

    min-width: 280px;
    max-width: 90%;
    padding: 14px 16px 10px;

    background: rgba(18, 18, 18, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;

    opacity: 0;
    pointer-events: none;
    z-index: 10000;

    overflow: hidden;
    transition: 0.35s ease;
}

.toast-sucesso.ativo {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-barra {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #ffffff, #777777);
    transform-origin: left;
}

.toast-sucesso.ativo .toast-barra {
    animation: toastTempo 3s linear forwards;
}

@keyframes toastTempo {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.busca-admin {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin: 1.8rem 0 2rem;
}

.busca-admin input {
    width: min(100%, 420px);
    padding: 0.95rem 1.2rem;

    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);

    background: rgba(255, 255, 255, 0.03);
    color: white;

    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;

    outline: none;
    transition: 0.3s ease;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");

    background-repeat: no-repeat;

    background-size: 18px;

    background-position: right 16px center;

    padding-right: 48px;
}

.busca-admin input:focus {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.busca-admin input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.status-email{
    width: fit-content;
    margin-top: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;

    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);

    color: #dcdcdc;
    font-size: 0.82rem;
    font-weight: 600;
}

.status-email{
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon{
    width: 16px;
    height: 16px;

    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}


.status-icon.sucesso{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a3a3a3' stroke-width='2'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E");
}


.status-icon.pendente{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999999' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}


.status-icon.pronto{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999999' stroke-width='2'%3E%3Cpath d='M4 6h16v12H4z'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.status-retencao{
    margin-top: 0.7rem;
    width: fit-content;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    color: #dcdcdc;
    font-size: 0.78rem;
    font-weight: 600;
}

.contato-expirado{
    border-color: rgba(255, 70, 70, 0.45);
    background: linear-gradient(
        135deg,
        rgba(255, 70, 70, 0.10),
        rgba(18, 18, 18, 0.95)
    );
}

.contato-expirado .status-retencao{
    background: rgba(255, 70, 70, 0.12);
    border-color: rgba(255, 70, 70, 0.35);
    color: #ff9b9b;
}

/* Celular deitado */
@media (max-height: 500px) {

    .modal-editar {
        align-items: flex-start;
        padding: 1rem 0.8rem;
        overflow-y: auto;
    }

    .modal-editar-box {
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #555 #111;
    }

    .modal-editar-box::-webkit-scrollbar {
        width: 8px;
    }

    .modal-editar-box::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.04);
        border-radius: 20px;
    }

    .modal-editar-box::-webkit-scrollbar-thumb {
        background: linear-gradient(to bottom, #5f5f5f, #3a3a3a);
        border-radius: 20px;
    }

}


/* TABLET */

@media (max-width: 900px) {
    .painel-section {
        max-width: 100%;
    }

    .painel-topo {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-logout {
        width: 100%;
    }
}

/* CELULAR */

@media (max-width: 768px) {
    .admin-wrapper {
        padding: 18px 12px;
    }

    .login-section {
        min-height: calc(100vh - 36px);
        align-items: center;
    }

    .login-card {
        max-width: 100%;
        padding: 25px 18px;
        border-radius: 18px;
    }

    .admin-logo {
        width: 120px;
        max-width: 65%;
        margin: 0 auto 18px auto;
    }

    .tag-admin {
        font-size: 0.68rem;
        letter-spacing: 1.6px;
    }

    .login-card h1 {
        font-size: 1.35rem;
    }

    .login-card p {
        font-size: 0.88rem;
    }

    .form-login input,
    .form-login button {
        font-size: 0.9rem;
        padding: 14px;
    }

    .painel-section {
        width: 100%;
        max-width: 100%;
    }

    .painel-topo {
        width: 100%;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
        gap: 18px;
        margin-bottom: 22px;
    }

    .painel-topo h2 {
        font-size: 1.45rem;
    }

    .painel-topo p {
        font-size: 0.9rem;
    }

    .btn-logout {
        width: 100%;
        max-width: 260px;
    }

    .lista-contatos {
        width: 100%;
    }

    .contato-card {
        width: 100%;
        padding: 20px 16px;
    }

    .contato-card h3 {
        font-size: 1.15rem;
    }

    .contato-info p,
    .mensagem p,
    .data-contato {
        font-size: 0.9rem;
    }

    .mensagem-login {
        font-size: 0.82rem;
        padding: 11px 12px;
    }

    .painel-acoes,
    .btn-voltar,
    .btn-logout {
        width: 100%;
    }

    .painel-acoes {
        flex-direction: column;
    }
}

/* CELULAR PEQUENO */

@media (max-width: 420px) {
    .admin-wrapper {
        padding: 14px 10px;
    }

    .login-card {
        padding: 24px 16px;
    }

    .admin-logo {
        width: 110px;
    }

    .login-card h1 {
        font-size: 1.25rem;
    }

    .painel-topo {
        padding: 18px 14px;
    }

    .painel-topo h2 {
        font-size: 1.3rem;
    }

    .contato-card {
        padding: 18px 14px;
    }

    .mensagem {
        padding: 13px;
    }
}