/* =========================================================
   CONFIGURACIÓN GENERAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;

    background: #050505;
    color: #f5f5f5;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    line-height: 1.5;
}


/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 45px 0 70px;
}


/* =========================================================
   ENCABEZADO
========================================================= */

.topbar {
    margin-bottom: 28px;
}

.topbar h1 {
    margin: 0 0 8px;

    color: #ffffff;

    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.topbar p {
    margin: 0;

    color: #9d9d9d;
    font-size: 15px;
}


/* =========================================================
   TARJETAS
========================================================= */

.card {
    margin-bottom: 22px;
    padding: 26px;

    background: #151515;

    border: 1px solid #303030;
    border-radius: 16px;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.35);
}

.card h2 {
    margin: 0 0 20px;

    color: #ffffff;

    font-size: 22px;
    font-weight: 650;
}


/* =========================================================
   TEXTO SECUNDARIO
========================================================= */

.muted {
    color: #969696;
}

small.muted {
    display: block;
    margin-top: -5px;
    margin-bottom: 10px;

    font-size: 13px;
}


/* =========================================================
   FORMULARIOS
========================================================= */

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   INPUTS
========================================================= */

input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;

    padding: 13px 15px;

    background: #0c0c0c;
    color: #ffffff;

    border: 1px solid #393939;
    border-radius: 9px;

    outline: none;

    font-size: 14px;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

input::placeholder,
textarea::placeholder {
    color: #666666;
}

input:focus,
textarea:focus,
select:focus {
    background: #101010;

    border-color: #777777;

    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.06);
}


/* =========================================================
   BOTONES GENERALES
========================================================= */

button,
.link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 10px 18px;

    background: #eeeeee;
    color: #090909;

    border: 1px solid #eeeeee;
    border-radius: 9px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 650;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

button:hover,
.link-btn:hover {
    background: #ffffff;
    border-color: #ffffff;

    transform: translateY(-1px);
}

button:active,
.link-btn:active {
    transform: translateY(0);
}

button:disabled {
    background: #292929;
    color: #686868;

    border-color: #333333;

    cursor: not-allowed;
    transform: none;
}


/* =========================================================
   CREAR ENLACE
========================================================= */

.form > button[type="submit"] {
    width: 100%;

    margin-top: 8px;

    background: #ffffff;
    color: #000000;

    border-color: #ffffff;
}

.form > button[type="submit"]:hover {
    background: #dddddd;
    border-color: #dddddd;
}


/* =========================================================
   CONSULTAR UBICACIÓN
========================================================= */

.consulta-row {
    display: flex;
    align-items: stretch;
    gap: 10px;

    margin-top: 16px;
}

.consulta-row input {
    flex: 1;
}

.consulta-row button {
    white-space: nowrap;
}

.consulta-estado {
    margin-top: 14px;

    color: #bcbcbc;

    font-size: 14px;
}

.consulta-estado.encontrado {
    color: #57df9a;
}

.consulta-estado.esperando {
    color: #d8c26a;
}

.consulta-estado.error {
    color: #ff7474;
}


/* =========================================================
   RESULTADOS DE UBICACIÓN
========================================================= */

.resultado-ubicacion {
    margin-top: 22px;
}

.resultado-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 12px;
}

.resultado-item {
    padding: 16px;

    background: #0c0c0c;

    border: 1px solid #2d2d2d;
    border-radius: 10px;
}

.resultado-item span {
    display: block;

    margin-bottom: 5px;

    color: #858585;

    font-size: 12px;
    font-weight: 500;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resultado-item strong {
    color: #ffffff;

    font-size: 15px;
    font-weight: 600;
}


/* =========================================================
   DIRECCIÓN
========================================================= */

.direccion-box {
    margin-bottom: 14px;
    padding: 16px;

    background: #0c0c0c;

    border: 1px solid #2d2d2d;
    border-radius: 10px;
}

.direccion-box span {
    display: block;

    margin-bottom: 6px;

    color: #858585;

    font-size: 12px;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.direccion-box strong {
    color: #ffffff;

    font-size: 14px;
}


/* =========================================================
   MAPA
========================================================= */

#mapConsulta {
    width: 100%;
    height: 430px;

    overflow: hidden;

    background: #111111;

    border: 1px solid #333333;
    border-radius: 12px;
}


/* =========================================================
   ENLACE GENERADO
========================================================= */

.generated {
    margin-top: 20px;
    padding: 18px;

    background: #0c0c0c;

    border: 1px solid #333333;
    border-radius: 11px;
}

.generated label {
    display: block;
    margin-bottom: 9px;
}

.copy-row {
    display: flex;
    gap: 8px;
}

.copy-row input {
    flex: 1;
}

.copy-row button {
    min-width: 90px;
}


/* =========================================================
   MENSAJES
========================================================= */

.success {
    margin: 15px 0;
    padding: 13px 15px;

    background: #10251b;
    color: #68e7a4;

    border: 1px solid #214d37;
    border-radius: 9px;
}

.status {
    margin-top: 15px;
}

.status.error,
.error {
    padding: 13px 15px;

    background: #281111;
    color: #ff8585;

    border: 1px solid #582626;
    border-radius: 9px;
}


/* =========================================================
   TÍTULO DE SECCIÓN
========================================================= */

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 15px;
}

.section-title h2 {
    margin: 0;
}

.section-title span {
    color: #aaaaaa;
    font-size: 14px;
}


/* =========================================================
   TABLA
========================================================= */

.table-wrap {
    width: 100%;

    overflow-x: auto;

    border: 1px solid #292929;
    border-radius: 11px;
}

table {
    width: 100%;

    border-collapse: collapse;

    background: #101010;
}

thead {
    background: #1c1c1c;
}

th {
    padding: 15px 13px;

    color: #bcbcbc;

    font-size: 13px;
    font-weight: 650;

    text-align: left;
}

td {
    padding: 14px 13px;

    color: #eeeeee;

    border-top: 1px solid #292929;

    font-size: 14px;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: #181818;
}


/* =========================================================
   ESTADOS
========================================================= */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
}

.badge.active {
    background: #123326;
    color: #61e8a3;
}

.badge.inactive {
    background: #321717;
    color: #ff8080;
}


/* =========================================================
   ACCIONES
========================================================= */

.acciones-enlace {
    display: flex;
    align-items: center;
    gap: 7px;
}

.form-eliminar {
    margin: 0;
}


/* =========================================================
   BOTÓN ELIMINAR
========================================================= */

.btn-eliminar {
    width: 42px;
    height: 42px;
    min-height: 42px;

    padding: 0;

    background: #251111;
    color: #ff7474;

    border: 1px solid #512020;
    border-radius: 9px;

    font-size: 17px;
}

.btn-eliminar:hover {
    background: #3a1515;
    border-color: #7a2c2c;
}


/* =========================================================
   PÁGINA DE CONSENTIMIENTO / SHARE.PHP
========================================================= */

.share-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background: #050505;
}

.share-card {
    width: 100%;
    max-width: 520px;

    padding: 34px;

    background: #151515;

    border: 1px solid #303030;
    border-radius: 18px;

    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.55);
}

.share-card h1 {
    margin: 0 0 12px;

    color: #ffffff;

    font-size: 27px;
    text-align: center;
}

.share-card .lead {
    margin: 0 0 22px;

    color: #a7a7a7;

    text-align: center;
}

.location-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 18px;

    background: #222222;

    border: 1px solid #383838;
    border-radius: 50%;

    font-size: 27px;
}


/* =========================================================
   AVISO DE PRIVACIDAD
========================================================= */

.privacy-box {
    margin: 20px 0;
    padding: 17px;

    background: #0b0b0b;

    border: 1px solid #303030;
    border-radius: 11px;
}

.privacy-box strong {
    color: #ffffff;
}

.privacy-box p {
    margin: 8px 0 0;

    color: #a5a5a5;

    font-size: 14px;
}


/* =========================================================
   CONSENTIMIENTO
========================================================= */

.consent {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin: 20px 0;

    color: #dddddd;

    cursor: pointer;
}

.consent input {
    width: 18px;
    height: 18px;

    margin-top: 2px;

    accent-color: #ffffff;
}

.consent span {
    flex: 1;

    font-size: 14px;
    line-height: 1.45;
}

.share-card > button {
    width: 100%;
}


/* =========================================================
   DETALLE.PHP
========================================================= */

a {
    color: #d5d5d5;
}

a:hover {
    color: #ffffff;
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #090909;
}

::-webkit-scrollbar-thumb {
    background: #343434;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b4b4b;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 800px) {

    .container {
        width: min(
            100% - 24px,
            1200px
        );

        padding-top: 25px;
    }

    .card {
        padding: 18px;
    }

    .topbar h1 {
        font-size: 26px;
    }

    .consulta-row {
        flex-direction: column;
    }

    .resultado-grid {
        grid-template-columns: 1fr;
    }

    .copy-row {
        flex-direction: column;
    }

    .copy-row button {
        width: 100%;
    }

    #mapConsulta {
        height: 350px;
    }

    .share-card {
        padding: 24px 20px;
    }

}

/* =========================================
   ADMIN / SESIÓN
========================================= */

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user span {
    color: #aaaaaa;
    font-size: 14px;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 14px;

    background: #1a1a1a;
    color: #ffffff;

    border: 1px solid #393939;
    border-radius: 8px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;
}

.logout-btn:hover {
    background: #242424;
    border-color: #555555;
}

@media (max-width: 700px) {

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

}

/* =========================================
   LOGIN / REGISTRO
========================================= */

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 18px;

    background: #222222;

    border: 1px solid #383838;
    border-radius: 50%;

    font-size: 25px;
}

.auth-form {
    margin-top: 20px;
}


/* =========================================
   SEPARADOR LOGIN / REGISTRO
========================================= */

.auth-separator {
    display: flex;
    align-items: center;
    gap: 14px;

    /* Espacio extra después de Iniciar sesión */
    margin: 45px 0 25px;

    color: #777777;
    font-size: 13px;
}

.auth-separator::before,
.auth-separator::after {
    content: "";

    flex: 1;
    height: 1px;

    background: #333333;
}


/* =========================================
   CREAR CUENTA
========================================= */

.auth-register {
    text-align: center;
}

.auth-register p {
    margin: 0 0 12px;

    color: #9d9d9d;
    font-size: 14px;
}

.registro-btn {
    width: 100%;
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;

    background: #1b1b1b;
    color: #ffffff;

    border: 1px solid #3a3a3a;
    border-radius: 9px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 650;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.registro-btn:hover {
    background: #252525;
    border-color: #555555;

    color: #ffffff;
}


/* =========================================
   CONTRASEÑA
========================================= */

.password-container {
    position: relative;

    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 75px;
}

.password-container .mostrar-password {
    position: absolute;

    right: 6px;

    width: auto;
    min-height: 34px;

    padding: 5px 10px;

    background: transparent;
    color: #bdbdbd;

    border: none;

    font-size: 12px;
}

.password-container .mostrar-password:hover {
    background: #252525;
    color: #ffffff;

    transform: none;
}


/* =========================================
   PIE LOGIN / REGISTRO
========================================= */

.auth-footer {
    margin-top: 25px;
    padding-top: 20px;

    border-top: 1px solid #303030;

    text-align: center;

    color: #909090;
    font-size: 14px;
}

.auth-footer a {
    margin-left: 4px;

    color: #ffffff;

    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* =========================================
   PANEL DE USUARIO
========================================= */

.usuario-bienvenida {
    display: flex;
    align-items: center;

    gap: 18px;
}

.usuario-bienvenida h2 {
    margin-bottom: 5px;
}

.usuario-bienvenida p {
    margin: 0;
}


.usuario-avatar {
    width: 62px;
    height: 62px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #252525;
    color: #ffffff;

    border: 1px solid #404040;
    border-radius: 50%;

    font-size: 22px;
    font-weight: 700;
}


.estado-cuenta-activo {
    color: #61e8a3 !important;
}


.panel-vacio {
    padding: 35px 20px;

    text-align: center;

    background: #0c0c0c;

    border: 1px solid #2d2d2d;
    border-radius: 11px;
}


.panel-vacio-icono {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 14px;

    background: #1f1f1f;

    border: 1px solid #383838;
    border-radius: 50%;

    color: #ffffff;

    font-size: 25px;
}


.panel-vacio h3 {
    margin: 0 0 7px;

    color: #ffffff;

    font-size: 18px;
}


.panel-vacio p {
    margin: 0;
}

/* =========================================
   ADMINISTRACIÓN DE USUARIOS
========================================= */

.btn-banear,
.btn-reactivar {
    min-height: 42px;
    padding: 0 14px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;
}


/* BANEAR */

.btn-banear {
    background: #291a0d;
    color: #ffb45f;

    border: 1px solid #5e3b19;
}

.btn-banear:hover {
    background: #3b2510;
    border-color: #875625;

    color: #ffc47e;
}


/* REACTIVAR */

.btn-reactivar {
    background: #10251b;
    color: #61e8a3;

    border: 1px solid #214d37;
}

.btn-reactivar:hover {
    background: #163425;
    border-color: #347453;

    color: #7cf0b5;
}

/* =========================================
   AVISO DE CUENTA BANEADA
========================================= */

.ban-alert {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.55);
    border-radius: 10px;

    padding: 16px 18px;
    margin: 20px 0;

    color: #fca5a5;
}

.ban-alert strong {
    display: block;

    color: #ef4444;

    font-size: 16px;
    font-weight: 700;

    margin-bottom: 8px;
}

.ban-alert p {
    margin: 0;

    color: #fca5a5;

    line-height: 1.5;
}

.ban-alert #banCountdown {
    color: #ff6b6b;
    font-weight: 700;
}
/* =========================================
   FORZAR ESTILO DE BANEO
========================================= */

.ban-alert {
    background: #2b0f0f !important;
    border: 1px solid #8a2f2f !important;
    color: #ffb3b3 !important;

    padding: 16px 18px !important;
    margin: 20px 0 !important;

    border-radius: 10px !important;
}

.ban-alert strong {
    color: #ff4d4d !important;
}

.ban-alert p {
    color: #ff9b9b !important;
}

#banCountdown {
    color: #ffffff !important;
    font-weight: 700 !important;
}