* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: #0F172A;
    color: white;
}

header {
    background: #1E293B;
    padding: 20px;
}

header h1 {
    font-size: 24px;
}

body {
    display: flex;
    height: 100vh;
}

.sidebar {

    position: fixed;

    top: 0;

    left: 0;

    width: 260px; /* ou a largura que você usa */

    height: 100vh;

}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 260px;
}

.topbar {
    height: 80px;
    background: #111827;
}

.dashboard {
    flex: 1;
    padding: 30px;
}

.sidebar {

    display: flex;
    flex-direction: column;

}

.logo {

    padding: 30px 20px;
    border-bottom: 1px solid #334155;

}

.logo h2 {

    font-size: 22px;

}

.logo p {

    margin-top: 6px;
    color: #94A3B8;
    font-size: 14px;

}

nav {

    display: flex;
    flex-direction: column;
    padding: 20px 0;

}

nav a {

    color: white;
    text-decoration: none;

    padding: 14px 24px;

    transition: .2s;

}

nav a:hover {

    background: #334155;

}

/* Dashboard */

.page-title {
    font-size: 28px;
    margin-bottom: 30px;
}

/* Card */

.card {

    background: #1E293B;

    border-radius: 12px;

    padding: 24px;

}

.card h2 {

    font-size: 18px;

    margin-bottom: 18px;

}

.card textarea {

    width: 100%;

    height: 220px;

    background: #111827;

    border: none;

    border-radius: 10px;

    padding: 16px;

    color: white;

    font-family: "Inter", sans-serif;

    font-size: 15px;

    resize: vertical;

    outline: none;

}

.card {

    display: flex;
    flex-direction: column;
    gap: 20px;

    margin-bottom: 24px;

}

.card-actions {

    display: flex;
    justify-content: flex-end;

}

.btn-primary {

    background: #2563EB;

    color: white;

    border: none;

    padding: 14px 26px;

    border-radius: 10px;

    cursor: pointer;

    font-size: 15px;

    font-weight: 600;

    transition: .2s;

}

.btn-primary:hover {

    background: #1D4ED8;

}

.history {

    min-height: 220px;

    background: #111827;

    border-radius: 10px;

    padding: 20px;

    color: #94A3B8;

    max-height: 400px;

    overflow-y: auto;

    padding-right: 8px;

}

.history::-webkit-scrollbar {

    width: 8px;

}

.history::-webkit-scrollbar-track {

    background: #1e1e1e;

    border-radius: 10px;

}

.history::-webkit-scrollbar-thumb {

    background: #555;

    border-radius: 10px;

}

.history::-webkit-scrollbar-thumb:hover {

    background: #777;

}

.history-item {

    padding: 15px;

    margin-bottom: 12px;

    border: 1px solid #2d2d2d;

    border-radius: 10px;

    background: #1b1b1b;

}

.btn-details {

    display: inline-block;

    margin-top: 12px;

    padding: 8px 16px;

    background: #f4b400;

    color: #000;

    text-decoration: none;

    border-radius: 6px;

    font-weight: 600;

}

.btn-details:hover {

    background: #ffca28;

}

.btn-back {

    display: inline-block;

    margin-bottom: 20px;

    padding: 10px 18px;

    background: #2d2d2d;

    color: white;

    text-decoration: none;

    border-radius: 8px;

    transition: 0.2s;

    font-weight: 600;

}

.btn-back:hover {

    background: #3b3b3b;

}


/* ========================= */
/* RECRIADOR DE ANÚNCIOS */
/* ========================= */

.card label {

    display: block;

    margin-top: 22px;

    margin-bottom: 8px;

    font-size: 18px;

    font-weight: 600;

    color: #ffffff;

}

.card input[type="text"],
.card input[type="number"] {

    width: 100%;

    height: 48px;

    border-radius: 10px;

    border: 1px solid #3d4b67;

    background: #1c2437;

    color: white;

    padding: 0 15px;

    font-size: 16px;

    box-sizing: border-box;

}

.card input[type="text"]:focus,
.card input[type="number"]:focus {

    outline: none;

    border-color: #2563eb;

}


/* CHECKBOXES */

.checkbox-group {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 18px;

}

.checkbox-group input[type="checkbox"] {

    width: 18px;

    height: 18px;

    cursor: pointer;

}

.checkbox-group label {

    margin: 0;

    font-size: 16px;

    font-weight: 500;

    cursor: pointer;

}


/* BOTÃO */

.card-actions {

    display: flex;

    justify-content: flex-end;

    margin-top: 35px;

}

/* Linha do ID + botão */
.linha-id {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Campo do ID ocupa o espaço disponível */
.linha-id input {
    flex: 1;
    margin: 0;
}

/* Botão adicionar */
.btn-adicionar-id {
    width: 42px;
    height: 42px;

    border: none;
    border-radius: 8px;

    background: #111;
    color: white;

    font-size: 24px;
    font-weight: bold;
    line-height: 1;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.btn-adicionar-id:hover {
    opacity: 0.8;
}

/* Botão remover */
.btn-remover-id {
    width: 42px;
    height: 42px;

    border: 1px solid #ccc;
    border-radius: 8px;

    background: white;
    color: #333;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.btn-remover-id:hover {
    background: #f2f2f2;
}

/* =========================================
   CLONADOR DE ANÚNCIOS
========================================= */

.clonador-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 50px;
    box-sizing: border-box;
}

.clonador-page .page-title {
    margin-bottom: 24px;
}


/* CARDS */

.clonador-page .card {
    padding: 28px;
    margin-bottom: 24px;
    border-radius: 14px;
}

.clonador-page .card h2 {
    margin-top: 0;
    margin-bottom: 24px;
}

.clonador-page .anuncio-recriador {
    padding: 20px;
    margin: 20px 0;
    border-radius: 12px;
}


/* LABELS */

.clonador-page label {
    display: block;
    margin-top: 18px;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
}


/* INPUTS E SELECTS */

.clonador-page input[type="text"],
.clonador-page input[type="url"],
.clonador-page input[type="number"],
.clonador-page input[type="file"],
.clonador-page select {
    width: 100%;
    box-sizing: border-box;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 9px;
    font-size: 14px;
    outline: none;
}


/* SELECTS */

.clonador-page select {
    cursor: pointer;
}

.clonador-page select:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}


/* ÁREA DE COMPATIBILIDADES */

.clonador-page #lista-compatibilidades {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.clonador-page #lista-compatibilidades .anuncio-recriador {
    position: relative;
    margin: 0;
    padding: 16px 130px 16px 18px;
}

.clonador-page #lista-compatibilidades strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

.clonador-page #lista-compatibilidades p {
    margin: 0;
    font-size: 13px;
    opacity: 0.75;
}

.clonador-page #lista-compatibilidades .btn-remover-id {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}


/* BOTÕES */

.clonador-page .card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.clonador-page .btn-primary {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
}

.clonador-page .btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}


/* SEPARADORES */

.clonador-page hr {
    border: 0;
    margin: 28px 0;
    opacity: 0.15;
    border-top: 1px solid currentColor;
}


/* UPLOAD */

.clonador-page input[type="file"] {
    min-height: auto;
    padding: 12px;
}


/* RESPONSIVO */

@media (max-width: 700px) {

    .clonador-page .card {
        padding: 18px;
    }

    .clonador-page #lista-compatibilidades .anuncio-recriador {
        padding: 15px;
    }

    .clonador-page #lista-compatibilidades .btn-remover-id {
        position: static;
        transform: none;
        margin-top: 12px;
    }

    .clonador-page .card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .clonador-page .btn-primary {
        width: 100%;
    }
}

/* =========================================
   INTEGRAÇÕES
========================================= */

.integracao-page {
    max-width: 1200px;
}

.integracao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-subtitle {
    margin-top: 8px;
    color: #6b7280;
    font-size: 14px;
}

.integracoes-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(380px, 1fr)
    );
    gap: 24px;
}

.integracao-card {
    padding: 28px;
}

.integracao-card-topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.integracao-identidade {
    display: flex;
    align-items: center;
    gap: 16px;
}

.integracao-logo {
    width: 52px;
    height: 52px;
    min-width: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    font-size: 15px;
    font-weight: 700;
}

.ml-logo {
    background: #ffe600;
    color: #2d3277;
}

.integracao-identidade h2 {
    margin: 0 0 6px 0;
    font-size: 18px;
}

.integracao-identidade p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.integracao-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 11px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.integracao-status.conectado {
    background: #ecfdf3;
    color: #16803c;
}

.integracao-status.conectado .status-dot {
    background: #22c55e;
}

.integracao-status.desconectado {
    background: #f3f4f6;
    color: #6b7280;
}

.integracao-status.desconectado .status-dot {
    background: #9ca3af;
}

.integracao-divisor {
    height: 1px;
    background: #e5e7eb;
    margin: 26px 0;
}

.integracao-detalhes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.integracao-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.integracao-info-label {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.integracao-info strong {
    font-size: 14px;
    color: #1f2937;
}

.integracao-info .texto-conectado {
    color: #16803c;
}

.integracao-acoes {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
}

.integracao-acoes form {
    margin: 0;
}

.btn-conectar,
.btn-desconectar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 0 16px;

    border-radius: 9px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

.btn-conectar {
    background: #111827;
    color: #ffffff;
    border: 1px solid #111827;
}

.btn-conectar:hover {
    background: #1f2937;
}

.btn-desconectar {
    background: #ffffff;
    color: #b42318;
    border: 1px solid #e5e7eb;
}

.btn-desconectar:hover {
    background: #fff5f5;
    border-color: #fecaca;
}

.btn-conectar:active,
.btn-desconectar:active {
    transform: translateY(1px);
}

.btn-conectar svg,
.btn-desconectar svg {
    width: 16px;
    height: 16px;
}

.integracao-vazia {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.integracao-vazia-icone {
    width: 40px;
    height: 40px;
    min-width: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f3f4f6;
    color: #6b7280;
}

.integracao-vazia-icone svg {
    width: 18px;
    height: 18px;
}

.integracao-vazia h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
}

.integracao-vazia p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}


/* RESPONSIVO */

@media (max-width: 700px) {

    .integracoes-grid {
        grid-template-columns: 1fr;
    }

    .integracao-card-topo {
        flex-direction: column;
    }

    .integracao-detalhes {
        grid-template-columns: 1fr;
    }

    .integracao-acoes {
        justify-content: stretch;
    }

    .integracao-acoes form {
        width: 100%;
    }

    .btn-conectar,
    .btn-desconectar {
        width: 100%;
    }
}


/* =========================================
   SIDEBAR - ITEM ATIVO
========================================= */

.sidebar nav a {
    position: relative;
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar nav a.active::before {
    content: "";

    position: absolute;

    left: 0;
    top: 50%;

    width: 3px;
    height: 24px;

    border-radius: 0 4px 4px 0;

    background: #ffffff;

    transform: translateY(-50%);
}

.sidebar nav a.active svg {
    color: #ffffff;
}

/* =========================================
   SIDEBAR - USUÁRIO LOGADO
========================================= */

.sidebar-usuario {
    display: flex;
    align-items: center;
    gap: 11px;

    margin: 20px 16px 18px;
    padding: 14px 12px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.1);

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;
}

.sidebar-usuario-info {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}

.sidebar-usuario-info strong {
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-usuario-info span {
    color: rgba(255, 255, 255, 0.55);

    font-size: 10px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   SIDEBAR - AJUSTE DE ALTURA
========================================= */

.sidebar {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar nav {
    padding-bottom: 24px;
}

/* =========================================
   LOGIN E CADASTRO
========================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px 20px;

    background: #f5f6f8;
}

.login-card {
    width: 100%;
    max-width: 420px;

    padding: 38px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.05);
}

.login-logo {
    margin-bottom: 32px;
    text-align: center;
}

.login-logo h1 {
    margin: 0;

    color: #111827;

    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-logo p {
    margin: 8px 0 0;

    color: #6b7280;

    font-size: 13px;
}

.login-campo {
    display: flex;
    flex-direction: column;

    gap: 7px;

    margin-bottom: 18px;
}

.login-campo label {
    color: #374151;

    font-size: 13px;
    font-weight: 600;
}

.login-campo input {
    width: 100%;
    height: 44px;

    padding: 0 13px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;
    border-radius: 9px;

    background: #ffffff;

    color: #111827;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.login-campo input::placeholder {
    color: #9ca3af;
}

.login-campo input:focus {
    border-color: #111827;

    box-shadow:
        0 0 0 3px rgba(17, 24, 39, 0.08);
}

.login-botao {
    width: 100%;
    min-height: 44px;

    margin-top: 6px;

    border: none;
    border-radius: 9px;

    background: #111827;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.login-botao:hover {
    background: #1f2937;
}

.login-botao:active {
    transform: translateY(1px);
}

.login-erro {
    margin-bottom: 16px;
    padding: 11px 13px;

    border: 1px solid #fecaca;
    border-radius: 8px;

    background: #fff5f5;
    color: #b42318;

    font-size: 12px;
    line-height: 1.5;
}

.login-cadastro {
    margin-top: 22px;

    text-align: center;

    color: #6b7280;

    font-size: 12px;
}

.login-cadastro a {
    margin-left: 4px;

    color: #111827;

    font-weight: 600;
    text-decoration: none;
}

.login-cadastro a:hover {
    text-decoration: underline;
}


/* RESPONSIVO */

@media (max-width: 500px) {

    .login-page {
        padding: 20px 16px;
    }

    .login-card {
        padding: 28px 22px;
    }

}

/* ============================= */
/* PREVIEW DAS FOTOS DO ANÚNCIO */
/* ============================= */

.preview-fotos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.preview-foto-item {
    position: relative;
    width: 90px;
    height: 90px;
    cursor: grab;
}

.preview-foto-item:active {
    cursor: grabbing;
}

.preview-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d9d9d9;
}

.preview-foto-remover {
    position: absolute;
    top: -7px;
    right: -7px;

    width: 23px;
    height: 23px;

    border: none;
    border-radius: 50%;

    background: #222;
    color: #fff;

    font-size: 17px;
    line-height: 20px;

    cursor: pointer;
}

.preview-foto-capa {
    position: absolute;
    left: 5px;
    bottom: 5px;
    z-index: 2;

    padding: 3px 6px;

    border-radius: 4px;

    background: rgba(0, 0, 0, 0.75);
    color: #fff;

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
}